package com.hqyj.dao;

import com.hqyj.pojo.MyUser;
import com.hqyj.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description 定义sys_user表的持久化操作(数据的增删改查操作)
 * @Autor 伍军
 * @Date 2022/4/26 10:49
 * @Version 1.0
 **/
public interface SysUserDao {

    //定义查询所有
    List<SysUser> queryAll();
    //新增1
    Integer insert(SysUser sysUser);

    //新增2
    Integer insertTwo(SysUser sysUser);
    //修改
    Integer update(SysUser sysUser);

    //修改
    Integer updateByCondition(SysUser sysUser);
    //删除
    Integer del(@Param("userId") Integer userId);

    //查询由多少条数据
    Integer queryCount();
    //根据用户名查询数据
    SysUser queryByUserName(@Param("userName") String userName);

    //动态sql查询一
    List<SysUser> queryByCondition(SysUser sysUser);

    //动态sql二
    List<SysUser> queryByConditionTwo(SysUser sysUser);

    //动态sql三
    List<SysUser> queryByConditionThree(SysUser sysUser);

    //批量删除
    Integer delBitch(@Param("list") List<Integer> list);

    //批量插入
    Integer insertBitch(@Param("list") List<SysUser> list);

    //动态排序
    List<SysUser> queryOrderBy(SysUser sysUser);

    //查询某个用户拥有多少角色 1
    SysUser  queryRoleByName(String name);
    //查询某个用户拥有多少角色 2
    List<MyUser>  queryRoleByNameTwo(String name);








}
